#!/usr/bin/env python 
# -*- coding:utf-8 -*-
import mysql.connector

db = mysql.connector.connect(
    host='8.142.105.62',
    user='root',
    passwd='123456',
    database='test'
)

cursor = db.cursor()
sql = 'select * from user where id=1;'
cursor.execute(sql)
rows = cursor.fetchall()
for row in rows:
    print(row)



# cursor.execute("SHOW TABLES")
# for x in cursor:
#     print(x)